var myObj = { "name": "runoob", "alexa": 10000, "site": null };
var myarr = [{ "name": "runoob", "alexa": 10000, "site": null }, "name"];

delete myObj.site;
for (x in myObj) {
    console.log(x + ":" + myObj[x])
        //console.log(myObj)
}

for (var key in myObj) {
    if (myObj.hasOwnProperty(key)) {
        var element = myObj[key];
        console.log(element)

    }
}

myarr.forEach(function(element) {
    console.log(element)
}, this);

for (var key in myarr) {
    if (myarr.hasOwnProperty(key)) {
        var element = myarr[key];
        console.log(element)

    }
}